package cn.lyh.iotmanage.controller;

import cn.lyh.iotmanage.common.R;
import cn.lyh.iotmanage.dao.EmqClientsDao;
import cn.lyh.iotmanage.service.EmqClientsDaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lyh
 * @version 1.0
 * @since 2021/5/15
 * 此接口用于查询数据库中转存的设备属性等数据
 */
@RestController
@RequestMapping("/device")
public class EMQDeviceController {


	@Autowired
	EmqClientsDaoService emqClientsDaoService;


	@GetMapping("/info")
	public R getDeviceInfo(){
		List<EmqClientsDao> list = emqClientsDaoService.getList();
		return R.ok().put("data",list);
	}

}
